package test2;

import java.util.ArrayList;
import java.util.List;

class College {
    private String name;
    private List<Building> buildings; // 聚合关系
    private List<Course> courses; // 组合关系

    public College(String name) {
        this.name = name;
        buildings = new ArrayList<>();
        courses = new ArrayList<>();
    }

    public void addBuilding(Building building) {
        buildings.add(building);
    }

    public void addCourse(Course course) {
        courses.add(course);
    }

    public List<Building> getBuildings() {
        return buildings;
    }

    public List<Course> getCourses() {
        return courses;
    }

    public String getName() {
        return name;
    }
}











